package edu.utsa.cs.contactmanager;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

@SuppressWarnings("serial")
public class Group implements Serializable{
	
	private long id = -1;
	private String name;
	private List<Contact> members;
	
	public Group(String name){
		this.name = name;
		this.members = new ArrayList<Contact>();
	}
	
	public boolean addMember(Contact c){
		return this.members.add(c);
	}
	
	public boolean removeMember(Contact c){
		return this.members.remove(c);
	}
	
	public void setName(String newName){
		name = newName;
	}
	
	public String getName(){
		return name;
	}
	
	public List<Contact> getMembers(){
		return members;
	}

	public long getID() {
		return id;
	}

	public void setID(long id) {
		this.id = id;
	}
	

}
